package com.ytkj.digitalConstruction.entity.assets;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

import org.hibernate.validator.constraints.NotBlank;

/**
 * 设备
 * 
 * @author iking
 *
 */
public class Device {

	/**
	 * 设备id
	 */
	private Integer deviceId;

	/**
	 * 设备名称
	 */
	@NotBlank(message = "设备名称不能为空")
	@Size(max = 50, message = "设备名不能大于50个字符！")
	private String deviceName;

	/**
	 * 外部编号
	 */
	private String externalCode;

	/**
	 * 项目id
	 */
	@NotNull(message = "项目组id不能小于0")
	private Integer projectId;

	/**
	 * 设备数量
	 */
	@NotNull(message = "设备数量不能为空")
	@Min(value = 1, message = "数量不能小于0")
	private Integer number;

	/**
	 * 使用状态，0-删除、1-可用、2-正在使用
	 */
	private Integer status;

	/**
	 * 设备描述
	 */
	@Size(max = 50, message = "描述不能超过50个字符！")
	private String deviceDesc;

	public Integer getDeviceId() {
		return deviceId;
	}

	public void setDeviceId(Integer deviceId) {
		this.deviceId = deviceId;
	}

	public String getDeviceName() {
		return deviceName;
	}

	public void setDeviceName(String deviceName) {
		this.deviceName = deviceName == null ? null : deviceName.trim();
	}

	public String getExternalCode() {
		return externalCode;
	}

	public void setCode(String code) {
		this.externalCode = code;
	}

	public Integer getProjectId() {
		return projectId;
	}

	public void setProjectId(Integer projectId) {
		this.projectId = projectId;
	}

	public Integer getNumber() {
		return number;
	}

	public void setNumber(Integer number) {
		this.number = number;
	}

	public String getDeviceDesc() {
		return deviceDesc;
	}

	public void setDeviceDesc(String deviceDesc) {
		this.deviceDesc = deviceDesc == null ? null : deviceDesc.trim();
	}

	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

}